package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbOrderInfoDto;
import com.gidgabs.modules.dao.TbOrderInfoDao;

import java.io.Serializable;
import java.util.Date;



/**
 * 产品订单详细表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-06 18:14:03
 */
public class TbOrderInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//
	private Integer id;
	//产品id
	private Integer productId;
	//文图描述地址
	private String graphicIntroductionUrl;
	//产品数量
	private Integer amount;
	//产品单价
	private Integer price;
	//产品名称
	private String productName;
	//创建时间
	private Date createTime;
	//父级订单id
	private Integer orderSuperId;
	//子级订单id
	private Integer orderSunId;

	/**
	 * 设置：
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：产品id
	 */
	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	/**
	 * 获取：产品id
	 */
	public Integer getProductId() {
		return productId;
	}
	/**
	 * 设置：文图描述地址
	 */
	public void setGraphicIntroductionUrl(String graphicIntroductionUrl) {
		this.graphicIntroductionUrl = graphicIntroductionUrl;
	}
	/**
	 * 获取：文图描述地址
	 */
	public String getGraphicIntroductionUrl() {
		return graphicIntroductionUrl;
	}
	/**
	 * 设置：产品数量
	 */
	public void setAmount(Integer amount) {
		this.amount = amount;
	}
	/**
	 * 获取：产品数量
	 */
	public Integer getAmount() {
		return amount;
	}
	/**
	 * 设置：产品单价
	 */
	public void setPrice(Integer price) {
		this.price = price;
	}
	/**
	 * 获取：产品单价
	 */
	public Integer getPrice() {
		return price;
	}
	/**
	 * 设置：产品名称
	 */
	public void setProductName(String productName) {
		this.productName = productName;
	}
	/**
	 * 获取：产品名称
	 */
	public String getProductName() {
		return productName;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：父级订单id
	 */
	public void setOrderSuperId(Integer orderSuperId) {
		this.orderSuperId = orderSuperId;
	}
	/**
	 * 获取：父级订单id
	 */
	public Integer getOrderSuperId() {
		return orderSuperId;
	}
	/**
	 * 设置：子级订单id
	 */
	public void setOrderSunId(Integer orderSunId) {
		this.orderSunId = orderSunId;
	}
	/**
	 * 获取：子级订单id
	 */
	public Integer getOrderSunId() {
		return orderSunId;
	}

	public TbOrderInfoDto toDto(){
		TbOrderInfoDto tbOrderInfoDto = new TbOrderInfoDto();
		tbOrderInfoDto.setGraphicIntroductionUrl(this.getGraphicIntroductionUrl());
		tbOrderInfoDto.setId(this.getId());
		tbOrderInfoDto.setProductId(this.getProductId());
		tbOrderInfoDto.setAmount(this.getAmount());
		tbOrderInfoDto.setPrice(this.getPrice());
		tbOrderInfoDto.setProductName(this.getProductName());
		tbOrderInfoDto.setCreateTime(this.getCreateTime());
		tbOrderInfoDto.setOrderSuperId(this.getOrderSuperId());
		tbOrderInfoDto.setOrderSunId(this.getOrderSunId());
		return tbOrderInfoDto;
	}
}
